﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pipes.Queries.Model.Query
{
  public class ConditionBranch : Parser.IQueryVisitable
  {
    public IExpression Condition { get; set; }
    public IExpression Branch { get; set; }

    public override string ToString()
    {
      return "WHEN " + this.Condition.ToString() + " THEN " + this.Branch.ToString();
    }

    public void Visit(Parser.IQueryVisitor visitor)
    {
      visitor.Visit(this);
    }
  }
}
